package jee.boot.common.rest;

import jee.boot.common.basic.CrudController;
import jee.boot.common.basic.result.ResponseMessage;
import jee.boot.common.basic.result.Result;
import jee.boot.common.service.MessageCodeService;
import jee.boot.entity.system.MessageCode;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 系统消息码
 */
@RestController
@RequestMapping("/messageCode")
public class MessageCodeRestController extends CrudController<MessageCodeService,MessageCode> {
    /**
     * 列表
     *
     * @param entity
     * @return
     */
    @PostMapping("/codeList")
    public ResponseMessage<List<MessageCode>> codeList(@RequestBody MessageCode entity) {
        List<MessageCode> list = service.findList(entity);
        return Result.success(list);
    }
}
